//
//  WFFarmDao.h
//  WisdomFarm
//
//  Created by sky on 2017/12/14.
//  Copyright © 2017年 sky. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface WFFarmDao : NSObject


/**
 保存农场

 @param farm 农场信息
 @param userId 用户 id
 @param completion  回调
 */
- (void)saveFarm:(WFFarm *)farm forUser:(NSString *)userId completion:(void (^)(NSError *error))completion;
/**
 获取用户农场列表

 @param userId 用户 id
 @param completion  回调
 */
- (void)farmListByUserId:(NSString *)userId completion:(void (^)(NSArray<WFFarm *> *farmList, NSError *error))completion;
/**
 获取指定农场信息

 @param farmId 农场 id
 @param completion  回调
 */
- (void)farmById:(NSString *)farmId completion:(void (^)(WFFarm *farm, NSError *error))completion;

/**
 删除农场

 @param dataId 农场数据库id
 @param completion  回调
 */
- (void)deleteFarmByObjectId:(NSString *)dataId completion:(void (^)(BOOL result, NSError *error))completion;

@end
